Correctly lex heading starts and ends