"How I Met Your Mother" ended its nine-season run last night ... and some parts of the finale were filmed NINE YEARS ago.  LYNDSY FONSECA says she and DAVID HENRIE filmed a bunch of stuff together back in 2005, so they wouldn't appear to age in the "flash-forwards" over the years.

SPOILER ALERT:  There's full recap on the events of the finale, here.