This closes #4180