Temporary fix for dependency on distiller class hierarchy when serializing a model that contains a thinning recipe.