Fix STI scopes using benolee's suggesiton. Fixes #11939