Issue #10017 - variant small refactoring