fixed case where assignment to a scalar in a function leads to an empty annotation