Fix problem with dynamic type calculation in SetWriter class.