Fixes Issue 5839.