Improve error recording during import.
Fix error when import as other user.

The problem occurred when the group was not initially
displayed.