I painted inside a house over a ceiling patch in a hallway and had to do the walls too.

The paint color we’d saved,  about a quarter of a gallon, was almost dried up even though the lid was on tightly.  And when I added water and stirred it, was somewhat lumpy.  We were able to get a color match because of the good eye and skill of a paint clerk at the local Jones’ Paint and Glass store.  But the formulas have been changed over the years even though the paint manufacturer was the same.

So I guess that the tip is to not keep the paint so long and keep it where its not to hot or to cold. It had been kept on the garage floor.