Fixes RT#91966 (deprecated way to call enum warning)