According to <acronym class="bbc ipSeoAcronym" title="Unofficial Skyrim Patch">USKP</acronym> changelog, "While on The Raid (FreeformRiften20) you would be flagged as trespassing in the Riften Warehouse even though the Jarl gave you the key." The fix seems to work at first because you are indeed not trespassing when you enter the warehouse, but :
<ul class="bbc">
<li>loot Sarthis' body for his key and use it to unlock the door of the small room, you are still not trespassing.</li>
<li>take the "Shipment's Ready" note, you are still not trespassing.</li>
<li>read the note, it will advance the quest, and look at your general stats : your trespassing counter has incremented. I noticed it because my counter was at 0 before doing this quest, and I was able to reproduce the steps.</li>
<li>I found one workaround : read the note outside the warehouse and your trespassing counter will not be bumped.</li>
</ul>