Cubeblack failed to switch to loiter or auto despite GPS lock

I was conducting waypoint navigation flights using a quadrotor equipped with 6" propeller.
The quad was performing fine and there was no indication of any problem. But in the last flight, the quad did not engage in loiter mode after taking off in stabilize mode. The quad was armed only after GPS lock was available. The parameters and waypoints were the same as the previous flights.
When checking the bin log for this flight, the message Mode change to LOITER failed: requires position was thrown by the FC . Its unclear why it threw this message because the GPS log indicates the Here3 gps had a fix.

FC - Cubeblack
Firrmware - Arducopter V4.1.5
log - 00000118.BIN (663.5 KB)

You were inpatient. Wait till EKF initialize. You can fly after you see the “EKF3 IMU1 is using GPS” message.

Aren’t the LEDs supposed to glow green only after the said message is shown?

If you in Loiter mode yes, but you did takeoff in Stabilize.

My previous understanding was that the LEDs glowing green, irrespective of which mode the FC is engaged, meant that the quad was eligible for flying in position based control modes.
What I understand from your reply is that LED glowing green in stabilize mode does not make the quad ready for loiter mode. Please correct me if I am wrong.

You are wrong. The led is green is the actual mode is armable.
In stabilize mode you dont need position information, so the led will be green as soon as the FC itself initialized.