[#7021] Fixed error serializing programmatically created commits