As Newtecky said 5940 has sent a MW to the handset of 5991 by either dialing 5991 then 7 or 5991 and pressing the MW key
#409 will cancel all MW indications on the handset as there can be many "banked" up on the same handset.
You will also notice if handset 5991 presses the MW key and the call is answered at 5940 then the light would go out (unless there was many MW lights sent from the same extension then you have to reply multiple times until they are all answered)

That handset also has a call forward external set on it as well.
If you need to cancel the CF External dial #6051


Regards
Carl