Add support for more return types for constrained gsharedvt calls. Fixes #13030.