Note that this method is essentially a duplicate of the one just above it. But this fix was developed in another branch and doing this should head off some merge conflicts when that branch is merged in (I hope!)