4099: Fix bug in set_var() for short values

If the entire value for set_var occurs in the var_name,
set_var was not parsing out the value correctly (the index call
was grabbing the index from inside the var_name).
Merge branch 'master_4099'