Along the (writing) way accidents happen, detours get taken... But these are not "divine" accidents; I don't believe in those. I believe you have constructive accidents en route through a novel only because you have mapped a clear way. If you have confidence that you have a clear direction to take, you always have confidence to explore other ways; if they prove to be mere digressions, you'll recognize that and make the necessary revisions. The more you know about a book, the freer you can be to fool around. The less you know, the tighter you get.