Flanagan spent the first half of the campaign on loan in League Two with title-chasing Gillingham, and his performances for Martin Allen's men earned him a call-up to the Northern Ireland Under-21 squad.
However, the towering centre-half suffered a broken metatarsal during his stay at Priestfield which sidelined him for eight weeks.
Since recovering, the Dons academy product has been named on the bench but has found it hard to break into the first-team in Milton Keynes.
Flanagan has now returned to League Two football, this time at the opposite end of the table to help Barnet in their fight for Football League survival.
He will go straight into the Bees' squad for their trip to Accrington this weekend.