Your patch works like a charm, see https://github.com/fredj/ol3/compare/layer-options