Recursive closure capture. Closes #571