For future reference: Better to create new MetaData object instead of passing along the one from the calling context.