It is standard practice in introducing any new legislation by the government to engage in a process of consultation and analysis with the Department of Justice once the policy intent is established and indeed confirm with the Department of Justice that the law being brought forward is constitutional, and that happened in this case.
On June 4th, 2015. See this statement in context.