Anecdotally, I once had an outrageously difficult time explaining to a German customs officer that the bag I placed in the scanner had items belonging to both my sister and myself. It didn't help that we were travelling together, and she was also there to back my statements up. He simply would not accept the fact that there was an electronic device (e-book) that belonged to her, in a bag that belonged to me, which we forgot to take out before the scanner.
Yes. They also won't try to 'interpret' their own country's laws, it's above their paygrade. If you aren't doing exactly what they expect, they will hold you (or your passport) and push the issue upstairs.
Source: I had this happen to me when I tried to enter Canada to work on a contract for which I should have had a work permit. My company had given me the paperwork appropriate for a salesperson or conference attendee. The officer at the gate confiscated my passport, told me to come back the next day with the correct paperwork, and threatened me with arrest if I failed to return. Stress and long nights ensued.
No problem - you have a paper trail showing where you got it, that you were unaware of what was in it, and that you were not allowed to inspect it.