Fix some edge condition errors in the format 4 compaction code.
Merge pull request #313 from bstell/master

Fix some edge condition errors in the cmap format 4 compaction code.