Added checking for version matching constraints and added to tests.