The attached simple patch fixes http://www.lyx.org/trac/ticket/10618
The bug is that on opening /saving a file only the float type is written to the label. But there exists a detailed label writing function that is just not called (only on buffer update).
OK to go in or have I overseen anything? If it goes in, this would be a candidate for LyX 2.2.3 as well. reards Uwe