This commit applies the same catch block to orderForConsistence(Map) than the one that's used for sets. Closes gh-31419