Got the program working as far as able. There is a bug in clearing items
with the second block in a pill. I suspect that this bug existed in the
original implementation. I won't be able to resolve it without reworking
the entire routine that does matching.