Fix functions as default values in records

successful check_value/2 needs to return its second argument
Merge pull request #2012 from cabo/master

Fix functions as default values in records