Fix theme flag detection.