LayeredParser bug with wrong EOF-extended elements fixed