Fixed #5767 (move bool Variable flag into flag variable)