[#4333261] set the flag earlier