"doing anything to" doesn't include giving/showing to?

I was trying to block the player from doing anything but examining to an NPC under certain circumstances. I had this:

Instead of doing anything other than examining to the teller while the teller is busy (this is the busy teller rule): say "'Sir, I'm very busy here,' she says. 'You're just going to have to wait your turn. Please get in line.'"
That worked for most actions, but GIVE and SHOW seem to be be exceptions:

I’m guessing that Inform doesn’t consider those actions “doing anything to the teller” because the teller is the second noun rather than the noun. Is that behavior intentional? It seems rather counterintuitive.

I think I managed to get around it in this case by changing it to this:

Instead of doing anything other than examining while the noun is the teller or the second noun is the teller (this is the busy teller rule): if the teller is busy, say "'Sir, I'm very busy here,' she says. 'You're just going to have to wait your turn. Please get in line.'" instead; continue the action.

This does work. You can also phrase it like this.

Instead of doing anything other than examining while the noun is the busy teller or the second noun is the busy teller (this is the busy teller rule): say "'Sir, I'm very busy here,' she says. 'You're just going to have to wait your turn. Please get in line.'".

Hope this helps.

That’s the accepted way of doing things, yes. I agree that the workaround is clumsy and somewhat unintuitive, but it’s necessary because it’s not always the case that the second noun is, conventionally speaking, having anything done to or with it. For example, “ask Bob for the apple” isn’t the player doing anything with the second noun - it’s the player requesting that an NPC do something with the second noun. Similarly, if you’re using the common trick of extending the conversational verbs to allow things as well as phrases in the subject slot, “tell Bob about the apple” is taking an action for which the apple is the second noun, but it can’t reasonably be said that you’re doing anything “to” the apple.

I think this also works:

 Instead of doing anything other than examining when the current action involves the teller and the teller is busy:

Is the teller the only NPC that the player has access to at that time? If not I think “as Mr X about teller” will not work properly.

By default, that will work just fine, since asking/telling it about uses topics. But if you’re using Eric Eve’s Conversation Framework, you will need to account for that possibility. If you are, it might be better to have your rule only affect the noun, and write special cases for the second noun.