Use a for loop to correctly and fully dereference and extract the type for the type of ParamSetPair.Value. Fixes #6785 Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>