Added some unit tests for the memoization code written previously, and
stopped using `Joiner.on()` when throwing a security exception as this
method caused a futher security query to be made, which ultimately leads
to a stack overflow.