Better checking for unwanted dependencies