Note: to test it you need a recent 2.8 build, I just pushed rB522ca182 which is required for this patch.
Hmrrrrr… Least I can say is that I’m not a big fan of that approach to solve forward compat issue. I find it a bit stupid to add some code & data for future stuff - especially since there is still no absolute guaranty that things in 'future' won’t change one way or another.
Why not rather use same approach as what we did e.g. when we switched to BMesh? I.e. simply add a 'compat' option to save .blend code, which would generate older layer data in .blend file? In any case, we need old layer DNA headers in 2.8 to read old .blend files, so it would not hurt to use them to save pre-2.8 compatible .blends either. And it keeps new-layers-aware code strictly in 2.8!
I also don't think we need to touch 2.7x code here. Forward compatibility should indeed be solvable by writing data that pre-2.8 Blender can read.
Wouldn't it be enough to write all objects from main list into Scene.base list in 2.8 code (with Base wrapper obviously)? Same with render layers, can't we just write out a compatible RenderData.layers list based on new Scene.render_layers?