Implicit detection of variables in defers within loop blocks