The generated header would not compile without these dependencies. Moreover users probably expect all-public option to be the most permissive filter including the maximal amount of declarations.