The bugs are:
- Fix bad depth test on weight paint while an armature is in pose mode.
- Fix selection of bones not working properly if the option In Front is enabled.
To draw an object with OB_DRAWXRAY, the pose mode engine calls the GPU_framebuffer_clear_depth(dfbl->default_fb, 1.0f) which clears the depth of the default framebuffer that is used by all other engines.
So the solution is to move that engine to the end of the list.
Note: Since the workbench engine has its own framebuffer for XRAY, it may be a good idea to move this framebuffer to DefaultFramebufferList so that it can be used by other engines.