Fixed dmflags2 and compatflags2 writing to wrong svar