Labor sought legal advice over Katy Gallagher's citizenship status