The proper heuristic seems odd but reasonable to me.
diff for reference: http://launchpadlibrarian.net/27497360/hardy.diff