Should fix up DELTASPIKE-638

Or at least make things a bit easier to follow.
Looks like I missed one case.

The tests now pass as expected.