Duh, just keep metadata at top level.

This is not even close to the general solution yet - just
proof of concept.