Fixed a new issue with vpkgs replacing the same vpkg they are providing.

Added a new testcase to verify its correctness.