Skip unnecessary pattern checks

Stopped state_match_pattern from trying to match the command string of a
successful pattern against the regular expressions of succeeding patterns.