Fixes #5175. [skip ci]