Fix bug in DB transaction rollbacks in the presence of domain-specific errors Closes #480 See merge request !420