Fix state conversion for lights
The code to add new light proxies was not generating new ids for the light proxies correctly. That was causing the proxies to end up with already used ids in certain cases. Fixed that.
Backport: release
Edited by Utkarsh Ayachit