fixes the handling of assignments with assign operation (like +=) in range analysis
minor cleanup in type inference