Fixed some bugs introduced by latest alchemy rework; need to overhaul other parts of code (repex context caching) next.