Closes #1874.