fix add_type_restriction() implementation with IN() function (closes #138635) [applied]