Improved the script for fixing the duplicated ACEs for user content.

References #517.