metadatalookup: fix logic error introduced in 5d3d319936513cac22557f9a3969f7210b8ac049