Use the correct parameterized type for enum flags
Fix Sql Server windowing function when used in Tables with references