Update Db.php

alternative solution: reset the insertedIds array after removeInserted is called to avoid large lists of unfound ids which can't be cleaned up.