Use infix search instead of elem to decide when to reply

Fixes #26