Resolves #10923

## Do NOT merge yet!
Resolves #10923.
Rebased from #10930.