Edge-case follies

Corrected some academic test failures and in so doing have uncovered a
deeper issue w/ my algorithm implementation which, granted, was flawed
to begin with.