After reading the implementation of `canonicalize_name`, I'm guessing that this is being done because that method warns. Perhaps we should have two methods, one that warns and one that doesn't?