Fixed the bug for extreme case. Refs #10224.
Merge branch 'bugfix/10224_findpeaks_bug' into develop