This function can all be implemented safely except for the access of the field in `TyDesc` I believe.