Restore elements order as they used to be in 2.2.

Should take care of #11262
Restore elements order as they used to be in 2.2.

* origin/pr/11318:
  Restore elements order as they used to be in 2.2.