Merge "Check for the package stoppped state first before checking the flag." into 24D1-dev