Deductions & credits

YES it is OK and that is just how the IRS wrote the law  and neither of you will have to pay it back ... a legal double dipping once again.