Remember any applied typecasts in VariableViewState.

Preserves and restores typecasts across steps like we already do
for node expansion states.