On demand regressions

Fix a bunch of regressions that have crept into the code over recent PRs, that break on-demand tiling.