Fix Container.getMetadata() such that it does not use container state