Cost function is now a function of state and the main cost function prefers
earliest requested version of a package as it is how we defined the best choice.