Fix single-op insertion.

In particular, this fixes limits being inserted before sort/group in a pipeline.