Custom order tweaks (for v2.3)

Same a #6848 for the `master` branch (v2.3).