An analysis of the mechanism of flame extinction by a cold wall