Fixed renaming costume breaking references to that costume

Fixes #2.