A small fix for bug #8365.  This does a better job including the correct files.