Fix variable substitution causing variable assignment to abruptly terminate.