Add support for non-register scalar values in DoMaterializeOneVariable.