Fixed DuplicateDatabaseException bug when applying a user twice in the
same transaction
Merge remote-tracking branch 'origin/master'