HI @lubos - are the changelogs listed here for fixing this issue in this topic
03 Mar 2016 Fixed inventory issue where debiting “Inventory - sales” income didn’t put inventory cost back to inventory on hand if quantity on hand was zero 16.2.71
February 2016
29 Feb 2016 Improved negative inventory handling
Also will this have fixed the issue of returning inventory - see this topic