[1.5.x] Fixed qs ordering related randomly failing test

The failure wasn't present in 1.6+, so this is not a backpatch.