#12148: sort ports mapping before allocating Upstream-commit: e03ac8d5b98f525c3d32bb5a6ac84b2c5717a0dc Component: engine