[PDI-10936] Sort rows step never ends when using the new presorted data option and an empty stream

Rebased to actual master and sent the pull request again.