Fixed a bug of cc.Layer for bake

Fixed a bug of cc.Layer for bake