Could we avoid this extra state by just checking if any variable has an empty name?