Currently RenderLayer's getter is public (RenderBoxModelObject::layer()) which makes it convenient for people to start poking the layer. However this is hurting us as objects outside rendering have some very deep knowledge of how rendering is supposed to work. This breaks the rendering abstraction and makes it harder to refactor RenderLayer in many ways.
I haven't thought deeply on that but RenderObject::hasLayer() should likely be made protected too as this is an implementation detail.
Sounds like a great idea to me.