[System.Runtime.Serialization] Work around `specified cast is not valid` error (...