Fixed a concurrency bug in rule installation.