Hi Danny, I also noticed this problem a couple days ago, and I really needed to scan something, so I've had these patches in my tree. It basically implements your second suggestion. I think it's the right way to go about it.
I realise you might also have patches you're working on, but maybe this is helpful anyway. Suggestions welcome, especially concerning how I handled the recursive module dependencies. Thanks, -- Andy