This closes #4086