If the m_light is an object instance derived from Urho3D::Component class then that would explain it. The Component::SetEnabled() method will send an event before it returns, but in your case instead of sending the event, the engine simply logging it as a programming error and bailing out.
I think you should move that logic to the main thread if you would like to take advantage of Urho3D event handling, specifically the E_COMPONENTENABLEDCHANGED event of your light component.