Fixes #4668.