Fix error in inventory restoration that would result in first item being lost

Signed-off-by: David Silver <dms.silver@gmail.com>
Merge remote-tracking branch 'upstream/master'

Merging with master