Fixes #6, data after subnodes being ignored.

My last commit (fixing #4) was causing data listed after a subnode to be misinterpreted, as the keys were being interpreted as values.  This fixes that, and adjusts the tests so that any similar problems will be flagged up in the future.