Fixes #4800.