Calling all Lincolniana specialists

So I'm watching an episode of Have Gun Will Travel and I encounter a premise that has embedded within it this esoteric Lincoln factoid (or edutainment fictoid).

The Mexican government, at some point before the twin hammers of Zachary Taylor and Winfield Scott are brought down upon it, is presented as having nationalized Roman Catholic church property in what is to become the American Southwest, and then as having sold said properties to all and sundry.

Abraham Lincoln is presented as having issued a presidential order directing the resale of said lands back to the Church under terms and conditions that are not entirely clear.

Is this fictitiously gilding the Lincoln halo or is there some basis in fact here?

I see from this website, that Benito Juarez (in power after Lincoln's death) "sold off lands that had been expropriated from the Church to hacendados (big landowners) who had supported the Liberal cause."

On the face of it, looks like we have an anachronism...