Yeah, ``::substitution``, ``::exists`` and ``::store`` can be done in a better way.  What would be better is if ``::substitution`` only wrote out the substition if it existed, and we hand over storing the substition to ``::store``.  That way we can get rid of ``::exists`` and clean things up a little bit (as well as ensuring everything is done in the right way).

Now you've got me thinking about it, I may just do that sometime this week.