Fix nested named functions