Distinguishability of causal structures under latent confounding and selection