If I completely fill the inventory, sometimes it'll say "cannot insert <x>, player's inventory full" and items will spill out. If there's as little as one open space left it works fine as far as I remember. Not a very big deal because I'm using other inventory size mods and I know it can trigger randomly if my inventory is completely full.
Good catch. This was happening when your inventory was full and you grabbed the last stack of an item. Since the item stack in your cursor is still part of the inventory now, I needed to count it as well.
Thanks for the bug report, this is fixed in 0.0.13