Merge: Metadata inheritance and enrichment throws NPE (#219)

Fix bug #219