Merge "Check for preexisting flag before enabling the gadget"