[1.7.x] Moved version directives to the bottom of the loaddata section.

Backport of 6403e07c5093e0244497293f31f5f73cebe85b66 from master