Fix brushes working in Gradient Map mode
The problem was introduced by the brush caching patchset. The problem is that the cache may be dependent on the canvas resources, so it should either be reset when cloning into the "fully defined state" or set to the pre-generated one.