Hi!
If the spouse already owns 1/2 of the house, then, the spouse will only be able to claim 1.2 of the refinance costs such as bank interest plus the existing half of any loan prior to the transfer.
Your idea is not too silly in transferring properties between spouses at certain times...