tcg: Work around clang bug wrt enum ranges