UK security agency investigates failures to stop bomber