Actually use correct hash and comparison function for unordered_map in OptimizeModel().