Fix some test failures caused by changes to handling of metadata.