Add debug code for hasClassImage.