Check that dependencies have the correct priority