Fix generation of checksum

Fixes generation of checksum if a field with default value if defined
but no value is set explicitly.