Fixes a special case for sorting by weight, closes #37067
Attach a file by drag & drop or click to upload