This happens because Xtext takes only parts of the editor text to
validate. The parser itself receives (mostly) the two lines that are
effected and it finds that they are syntactically correct :(
I guess you can insert in document processing actions and modify the
change event, but it will be a pretty costly operation. If you are
interested checkout eclipse IDocument related stuff.