Improves error message on malformed variables. [Finishes #78160508]