reintroduced, but did not enable, code for loop collapsing