Buildings used for human habitation, and buildings accessory thereto, within employee housing shall comply with the building standards published in the State Building Standards Code relating to employee housing and with the other regulations adopted pursuant to this part, unless a local ordinance prescribing minimum standards adopted in accordance with Sections 17958.5 and 17958.7 which is equal to such regulations is applicable. Notwithstanding the provisions of Section 17050, if such a local ordinance is applicable to buildings used for human habitation, and buildings accessory thereto, within employee housing, these buildings shall comply with the construction and erection provisions of the ordinance.