Any cop, any boarder agent, any person of authority can be a douche bag. Happens every day. Bottom line is: the letter of the law prevails. That's why you must have all the paperwork stating what is, & what can be.
I once got busted for a bag of grapes going into Canada. They saw my kids eating grapes, and they searched the entire car. No fruit allowed. 2 little kids were not happy when the boarder agent confiscated their grapes.