When completing a submission that is installed directly in the archive (passing through all workflow), the Item can be lost (although the Item table row is left disconnected from workspace, workflow, or collections) if an exception gets thrown in that last step. The problem is that the context gets committed upstream, in the XMLUI continuation code that does not check for errors and appears to lose track of exceptions.
The proposed patch catches exceptions in CompleteStep, where there is a call to Context,commit() in the case that all goes well. It rolls back the transaction in case of an exception, so the data model is NOT left in an inconsistent state. I think it is reasonable to make this step code take control the transaction in the case of failures since it was already doing so in the case of success.