A stability theorem for solutions of abstract differential equations, and its application to the study of the local behavior of solutions of elliptic equations