Adding the ordering by the VID.

Relate to issue #2216 

This a PR against the make branch.