Fix scanT/reduceT handling in internaliser.
Small cleanups.
Tweaks to internal L0 construction.