Merge pull request #4670 from BrzVlad/fix-sgen-testing