In combat, casualties are removed from the back rank of their unit as normal, even though it is models within the fighting rank(s) that are being slain. Slain models are considered to have been removed from the end(s) of the fighting rank. This represents members of the rear ranks 'stepping forward' to fill gaps, whilst models remaining in the fighting rank 'close in' upon the enemy.
Note that a model cannot attack during a phase in which it stepped forward into the fighting rank. However, any models that remain in the fighting rank after casualties have been removed are more likely to be in base contact with the enemy, having closed in upon them.