ensure that numbers differ from sorted numbers, fix #118660

alternative fix
Merge pull request #119238 from mauk81/patch-7

ensure that numbers differ from sorted numbers, fix #118660