We never welcomed immigrants because we were good or had high ideals.

At first America needed people to settle the continent so we had open immigration.  
We then passed laws to limit or exclude Chinese and Japanese.  Later quotas were added to reduce/prevent the immigration of Irish, Italians and Polish.  You know, Catholics.  Additional modifications were added which resulted in reduced immigration from Mexico and Latin America.  See http://connection.ebscohost.com/us/immigration-restrictions/history-immigration-laws-us

There was never an idea of open immigration in America.  Immigration was always used or directed for a specific purpose.  To fill up the space.  To get laborers.  To get skilled workers.

Our moral compass has not been disoriented.  I believe that our attitude is changing from moral wobbliness to a will to enforce the laws on the books.  And those current laws do not discriminate.