764. Unsuccessful denial of mortgagor's right or untenable claim.

If the mortgagee unsuccessfully denies or resists the mortgagor's right to redeem, whether on the ground that it has been extinguished1, or otherwise2, he is liable for the costs so occasioned. Usually the costs will not be payable to the mortgagor personally; they will be set off on his redeeming3. A first mortgagee must pay the costs if he sets up an unsuccessful claim to consolidate4, or refuses to allow the mortgagor to redeem on the ground that a subsequent incumbrancer wishes to do so