Only search for regular names; should fixe #include of ROOT-6976.

(cherry picked from commit 06775424bd1a0b5519dbb845367920d82ceb69d8)