allow adding product to empty category by api

When POSTing a new product using webservice, this function gets called with $position = 0. When the category is empty, count($result) = 0 and this cannot result in success.