Fix a small bug.

Would have cropped up if someone had selectors following a transformation that
returns top-level nodes.