In actions brought against several heirs or several devisees jointly, the amount of plaintiff‘s recovery shall be apportioned among all the heirs of the ancestor, or all the devisees of the testator, in proportion to the value of the real property descended or devised, and such proportion only can be recovered of each.