Ensure PATTERN_DEF_SEQ is empty before recognising patterns