Update Db.php

This prevents the removeInserted function from re-attempting to remove ids which it has previously failed to remove.
Merge pull request #1213 from acdameli/cleanup-db-module-inserted-ids

Update Db.php