Fix definition packing order (#1189)

Applied the latest changes.