This error can occur if the statement

<RunInstallerAttribute(True)>

is modifying an installer class within a module.

Apparently, this modifier must be at the global namespace level.