Appellate court says spouses must qualify as first-time homebuyers for tax credit