The sensible solution would be for every point of entry and exit to scan their passport and take some biometrics (finger prints, photo and retinal scan) and put an end to this nonsense.
This need only apply to passport holders from a particular list of countries.