Fix parser EodExceptions

Fix Parser EodExceptions thrown as a results of changing nextTag().
Clean up various nextTag() loops so they are checking for the right
end tag.

Bug:15086892
Change-Id: I9ff0593bb062968d5556f028638c3bf13f3410d3
8 files changed