Fix a bug regarding the correct initialization order of ExtendableNodes

It was possible for a Node to use an uninitialized metaData to
initialize its metaData in deeper inheritance hierarchies.
Fix many broken things after the introduction of declarations.