@elemoine I suppose that it works for `ol.layer.Layer` because of the unit test ...
Thanks for the patch, I'll give a try