Catch potential bug in anagram