Fix issue of k parameter being ignored
Fix issue of k parameter being ignored

Too much cleverness in the sorted set comparator made the membership check for a cell in SearchPlanColumn's :ordered-set always return false.
Also in case a duplicate entry exists, we either replace an item or leave the plan unchanged, and as neither has anyhting to do with empty space, it is more
straightforward to do it first. Then only if no duplicate is found do we resort checking for empty space or replacing the last item.

FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph