Optimize absolute class name detection.