tgrep.py: break _tgrep_positions_no_leaves out of tgrep_positions