Correctly handle invalid sequence patterns.