debug: improve yylastline

thunks->begin cannot be trusted. walk back, and also walk forth to find the last \n