Melt the butter in a pan over medium heat. Cook the liver and onions until tender, about 5 minutes. Transfer mixture to a blender or food processor and pulse until smooth. Add the egg, milk, thyme, salt, pepper and lemon juice; blend until smooth.
Place the bay leaves on the bottom of a 1-pint ovenproof dish; line the base and sides with bacon. Spoon the liver mixture into the dish. Place the dish in a tin of water.
Bake, covered, in the preheated oven until just set, about 75 minutes. Remove from the oven and leave to cool; turn on to a serving dish.