make StrTrie.contains work on immutable tries