Improved diagnostics for custom-tree preview (old work)