Causal Networks and Freedom of Choice in Bell’s Theorem