High: PE: Rewrite the ordering constraint logic to be simplicity, clarity and maintainability
Mercurial revision: 2d7801e216f929eb005ff937d93ef9854dd3bb79