Fix #15862 remove dirs in keep list when walk path

I'm Happy! I learned something today!