I'm too lazy to look at the code

, but from memory:
* agent-to-agent inventory offers
1) offered item/folder is added to the recipient's inventory
2) recipient is sent an inventory offer message (which may or may not get through if you're capped)
3) if you accept then all that happens is that the sender sees an "has accepted"
(If you decline the viewer itself moves whatever you got sent into the trash - which is why that happens when you're set to Busy)
* script-to-agent inventory offers
Same thing happens except the order is: 2, 3, 1 so the items a script offered don't get moved into your inventory until *after* you accept them. Since you don't get the transaction UUID to accept because your IMs were capped nothing ever makes it into your inventory.
(If you decline then the backend doesn't ever copy anything over to your inventory so there isn't anything for the viewer to move into the trash)
---
That's why agent-to-agent always succeeds even if your IMs are already capped and why script-to-agent fails (if you don't get the IM then you can't accept and then you the transaction stays in limbo).
It's really not an inherent problem with llGiveInventoryItem() or llGiveInventoryList(); if LL simply changed the script-to-agent inventory to be 1, 2, 3 as well (would create a bit of a mess with existing viewers) then the problem is solved already.