Fixed handling of recursive symlinks when collecting tests.