I see metadata_to_strip in a couple of places. Most suspiciously in load_metadata. But I don't see any callers into load_metadata.... Is that dead code?!?

OK, maybe @cahrens suggest to use metadata_to_strip is the right one to use here