See line 432 (unless my logic has gone wrong).