The trigger to set the flag for the secret is the same trigger that sends the number pop-up, so you might've just missed it by literally a frame or two!