Pulse flour, butter, and sugar in a food processor until breadcrumbs form.
Add one egg and pulse until a rough dough forms, adding milk if too dry.
Shape the dough into a ball, wrap in film, and chill for 20 minutes.
Roll out dough on a floured surface and line a 30x20cm tin.
Chill the lined tin in the fridge for 30 minutes.
Preheat the oven to 200°C.
Blind bake the pastry with parchment and beans for 15-20 minutes.
Remove beans, brush pastry with beaten egg, and bake for 5 more minutes.
Reduce the oven temperature to 180°C.
Beat filling butter and sugar until pale and fluffy.
Mix in ground almonds and then add remaining eggs one by one.
Fold in the lemon zest and flour.
Spread jam across the pastry base, leaving a 2.5cm border.
Spread filling over the jam and top with flaked almonds.
Bake for 20 minutes until set and golden-brown.
Cool in the tin and slice into 5cm squares.