Fix test failures caused by removal of virtual fields from get_metadata