Allow spaces in variable names during expansion

Improves RM #1970.

There are other cases of scanf using %[^.].%s, mostly in function
evaluation that this does not cover.