Put the celery, bay leaf and thyme in the same pan and cook for several minutes or until the celery is softening at the edges – add 1 tbsp of water if the bottom of the pan is getting a little dark. Tip in the flour and cook for 2 minutes, stirring all the time. Slowly add the ale, stock and Worcestershire sauce, while stirring, then tip the beef back into the pan. Bring to the boil, put on the lid and cook in the oven for 2 hours, then remove the lid and cook for a further 2 hours or until the beef is meltingly tender. Remove from the oven, season with salt and pepper, and add the sugar and pickle juice. Stir vigorously to break up some of the beef – it will look as though there is too much gravy at this stage, but it will be fine once baked. Leave to cool completely, then pick out the thyme and bay leaves, and stir through the pickled onions.