Were you flying to or from somewhere else in Europe in the Dublin case? A subtlety about this which has just come up elsewhere in this thread is that the whole Schengen Area is treated as a single "country" for immigration purposes, so if you have an intra-European flight, you have to enter or exit "Europe" in the course of a transfer to or from an external flight.
But I think if you fly, for example, from New York to Paris and then on to Tunis, you don't have to go through immigration controls in Paris.