Protect defers auth identity spec.env templates until credentials exist.
General stack rendering must never execute these expressions with its broader function map.
The restore function preserves the original scalar source after general rendering finishes.