Fix banner condition on subfolders and add test
This refs affinitic #5758