Added patch to prevent rules from trying to call module functions on cached pages when modules not loaded.