Use returnvalue of SwiftDef finalize, log error if roothash could not be

computed