Can an employer's health and safety obligations override its duties under anti-discrimination legislation?

Although the Equality Act 2010 prohibits discrimination because of the protected characteristic of sex, para.2 of sch.22 to the Act in effect provides that any action taken to comply with health and safety legislation that concerns the protection of women in relation to pregnancy or maternity, or any other circumstances that give rise to risks that specifically affect women, will not amount to unlawful discrimination. Similarly, para.1 of sch.22 to the Equality Act 2010 in effect provides that any action taken to comply with health and safety legislation will not amount to discrimination because of the following protected characteristics: age, disability, religion or belief, sex or sexual orientation.