Added check for duplicate rules in the same module.