Fix reference error when shader compilation fails.
Reorder levels, again. Fix level that sometimes generates an awkward pattern.
Simplify shifting logic and don't call updateChildren so much unnecessarily.