Fix 10494 master

Fixing the #10494 issue against master (as the direct pull wouldn't come across cleanly).