I noticed that all settings that I had previously declared under defined media queries tabs were deleted after merging with another design pack.
I went through your code and I wonder if you should not apply the same treatment to m_query as for view_state?
If not it seems that original m_query settings are completly erased when merging a design pack.