Right, what is needed is something trie-like, with the root being the most fine-grained call.