**Exact steps for others to reproduce the error**
1) Create Lamp Data Node for any node material
2) Select any scene lamp in Lamp Data Node
3) Switch to Material mode
4) Remove that lamp from the scene
After research I found that it happens because field "users" of linked lamp not incremented when lamp is being selected in Lamp Node.
Nevertheless after opening saved file "users" restores correct number of links and lamp origin becomes blue. IMO increasing and decreasing of "us" field should be in combobox event handler of "Lamp Data" shader node,
but I've not found any good infrastacture for this yet.