"But when the man saw the yarmulkes"
If its not exposed they want bother you.
Only if its considered.
"obvious Israeli identification"
"The man in the counter asked us to take off our hats and we thought it was standard procedure for passport control. But when the man saw the yarmulkes....."
Seems like yarmulka under hat would be an issue too.
How about tefilin? If only exposed Jewish articles are an issue, who exposed their tefilin at a border crossing?