Remove unneeded sorting condition.

From #2853.

This sort was completely unused, but was causing an extra join to happen on the node table. Removing the sort fixed the issue.