#1621 fixed an issue with template names that look like special Windows paths by always using posixpath.join on the path parts. However, this made the final name have a mix of os.sep and os.altsep, which might mess up textual comparisons. After safely joining the path, it should be normalized again with os.path.normpath.