Probably you are right... and in acad 2016 this bug not exist, but i and my frend use acad 2013 and this thing make sense...
OK, to test if it's an ACad bug (sorry I no longer have a copy of 2013 to do the test myself):
- Type REN<space> in ACad's command line.
- Select one of the xref blocks.
- Give it a new name.
- Click Rename & Close.
- Open XRef manager, right-click on it and reload.
Does this retain your layer settings? If so, it seems it's something to do with the ActiveX libraries used in that code. If not, then there's a bug in 2013.
To get around this, you'd need to implement some form of manual layer-state restore. It may just be enough to save a layerstate and then restore it after the rename+reload code is run. But it may still have an issue due to the name changing, in which case you'd need to save the layer settings into a lisp variable and then restore them manually after the rename+reload (after altering for the new name).