Global Anomaly Detection in Two-Dimensional Symmetry-Protected Topological Phases.