I think the most sensible - and most likely - solution to this problem has already been given by Oniw17:
Who in their right mind would give parents such highly prejudicial information in the first place?
Oniw17 said:if it was possible to test for homosexuality in the womb, it would be best to restrict those types of tests.
Who in their right mind would give parents such highly prejudicial information in the first place?