Cannot use serialization on object that can hold closures

Change-Id: If6fe042df9e3040aa98821f9d5acaed92339cd62