Use generalize lambda captures when assembling tests