Fix definition packing order (#1189)

To match the changed loading order from previous commit
Merge remote-tracking branch 'origin/master' into learning_branch