I haven't checked any other types of events besides on TEXT and INPUT, so I don't know if this happens in more places. I have an on TEXT event and an on INPUT event where the target is set to "#,?" like the following

on *:INPUT:#,?: { ... }
on *:TEXT:*:#,?: { ... }

The INPUT event only triggers in channels, while the TEXT event triggers in both channels and queries. If I reverse them (?,#), it still works in both locations for the TEXT event, but now only works in queriest for the INPUT event.