fixed struct equality checking (and trie equality checking in general)