Re #7858. Sort peaks by d-spacing before comparing.
Merge branch 'bugfix/7858_broken_scd' into develop