Perform name resolution on while loops