Limited version of the "preferred locations" optimization.