Merge "Add SetFlagsRule to FreeformTaskListenerTests since the current flagging system is not working in this test." into main