Catch minor bug in the database ORM.
Catch minor bug in the database ORM.

Weren't handling an edge case when syncing with an object in the database
which has been deleted. As a result, trap was giving me a
'list index not valid' exception.

mkuiack/tkp,transientskp/tkp,mkuiack/tkp,transientskp/tkp,bartscheers/tkp,bartscheers/tkp