These commits introduced some issues with keeping track of metadata references, so revert them until a proper solution is found.
This reverts 76e71ddf and 62f8b887.