Restrictions on leave for jailed mothers are unlawful