When it appears in an action provided for in section 645 of this title that before the commencement thereof the heir or devisee has aliened the real property descended to him, or any part thereof, he shall be personally liable for the value of the property so aliened, and a judgment may be given against him therefor, to be enforced by execution, as if the judgment were for his own debt. No real property aliened in good faith and for a valuable consideration by an heir or devisee before action commenced against him is liable to an execution for the debt of his ancestor or testator, or in any manner affected by the judgment therefor against such heir or devisee.