(#17094) Ensure that a leading $ resolves

The issue was the we could end up in a recursive, infinite loop if the 
variable was preceeded by a `$`. This was caused by an old parsing mechanism
that dumbly stripped off characters and sometimes made no progress. The new
system doesn't do that, but this ensures that it doesn't.