Check the metadata contexts that are being finalized before attempting t...

...o finalize them