Fix command -> tree node lookup for filtered trees.
Fix command -> tree node lookup for filtered trees.

The lookup made assumptions about the tree layout that are no longer
correct when the tree is filtered.

google/agi,google/agi,google/agi,google/agi,google/agi,google/agi,google/agi,google/agi