Backport from conspiracy: Make closure capture recursive. Closes #571