Ensure defaults are applied on save if the default is a function.

Update the test for lambda defaults.