Clean up the proper-subset cost adjustment logic to make it more compact
and easier to read and so that full branch test coverage is more easily
obtained.