fix: re-add gCastEnabled negation (#29499)