Anomaly freedom in perturbative loop quantum gravity