Serious spoilers for both Series 9 and Series 10 finales.
In Series 10 finale, "The Doctor Falls",
when the Doctor starts to regenerate, we see a montage of all his past companions, at least of the rebooted series: Rose, Martha, Capt. Jack, Donna, Amy, Vastra, Jenny (not his daughter/clone), River Song and Clara.
However, in the series 9 finale
The Doctor forgets about Clara, with the wiping memory thingy that was reversed or something.
What I'm trying to ask is, is The Doctor actually remembering his past companions, or is that just an out-of-universe flashback only meant for us the viewers, as dramatic effect? If the Doctor is remembering them, he would be unable to remember that particular companion, wouldn't he?