Re-instate a fix which got lost in a merge.