Fix missing method error when removing keys from a class

This PR fixes an issue we experienced calling `set_collection_name` on