Any act done by an executor or administrator in the due course of administration, and any payment made by the executor or administrator on account of a legacy or distributive share shall be valid, until it appears to have been erroneously or unlawfully done or made although the executor or administrator shall be removed from office or shall die before closing the estate.