Heat oven to 190C (170C fan). Rub the butter into the flour until it resembles breadcrumbs, stir in the sugar, then add just enough cold water to bring it into a dough. Roll out and line a 20 cm tart tin, prick the base all over and chill for 15 minutes.
Line the pastry with baking paper and baking beans, and bake blind for 12 minutes. Remove the paper and beans and bake for another 5 to 8 minutes until the base is dry and pale golden. Cool completely.
Warm the jam briefly so it spreads easily, then spread it over the base in an even layer. If you are using banana, lay the slices over the jam now.
Make the custard: whisk the custard powder and sugar with 3 tablespoons of the milk in a small bowl, then heat the rest of the milk until just simmering. Pour the hot milk over the powder mix, whisking, return it all to the pan and cook for a minute until it is a thick pouring custard.
While still hot, pour the custard over the jam layer, level the top and chill for at least 3 hours until set. Scatter the coconut over the top just before serving, placing the halved glace cherries in the middle if using.