Fixes #1847.