One loophole in the legislation would have been for each mum to move into the other's home for the duration of the shift - it would be perfectly 'legal' to care for a child in their own home.
This law certainly does need revision - thanks for the link to the petition