Problems with claiming first-time homebuyer expense with Roth IRA and Form 8606

Hi all. Background - have had a Roth IRA for more than 5 years, am under 59 years old. I took a disbursement from my Roth IRA to buy a home for the first time (yay) but it seems to me like Turbotax isn't properly reducing the Qualified homebuyer expense exception FIRST before subtracting the basis in contributions. I'm incurring a tax penalty as a result, but I don't think I should be. According to form 8606, I believe that the line 20, qualified first-time homebuyer expenses should be subtracted from the distributions before the basis is reduced. Is this a bug?


In the workflow, I've entered my contribution basis (38K) and I took out 44K as a distribution. The qualified first time home buyer expense is 10K max, so it should be 44K - 10K - 38K = no taxable event, right? What am I missing here?

 

For additional background, this seems to only be a problem when my 1099 is coded in box 7 as "J", but my brokerage says that it's up to me to determine the qualified exceptions so that needs to stay as J.