I have a problem when trying to build a documentation using dub.

If I do dub build everything works, but if I do dub build -b ddox the build fails with:

Error: unrecognized file extension
dmd failed with exit code 1.

Looking at the verbose output I see that building ddox adds '.' to the list of files for dmd a this is what crashes it (that is manually removing the dot and reruning the command makes it work). Any idea how to get rid of it?