Did the Habsburg monarchs know about incest problems?

by fyvm

The Austrian Habsburg monarchy was/is famous for its rampant inter-marrying of close family members. Hence suffering from incest-connected disabilities such as the notorious "Habsburg jaw" (I hope that's the right translation).

My questions are: did they know that these disabilities were caused by incest or was this a discovery of more recent science? If so, why didn't they stop? Or was the blood line more important than healthy heirs (the latter being one of the main reasons to "keep the bloodline pure")?

Bonus question: basically the same but in regards to the Egyptian pharaos or other royal dynasties etc.

Thanks!

Dinocrocodile