When looking at input for an event, don't look too deep.

Now input prefixes longer than maximum possible single input sequence are discarded.