Fix deep levels of nesting.