Refactor `branch?` logic for compressed trie.