As long as a passenger is not wanted for a crime, then he/she can not have any adverse action taken against them for being in transit.
I was deported from the U.S. yet I have been on flights making stops in the US. As long as I do not leave the Sterile area nothing adverse can happen to me.