Fix doxylocal detection
It looks like my Doxylocal detection fix is still broken. This was noticed by Thomas Fetzer, who sent me a patch via email. I think there was still a problem in that patch, so I added another commit. I'll ask Thomas to test this branch before merging.