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

Benolee's suggestion works and all the tests pass so why not use it? Fixes #11939.