Er, that last ifvarclass should obviously be "!rudder_reverse_proxy_apache_mod_${modules}_loaded".