This is simply reverting the changes in #3000 - the original code included this.