Empty generators when setting references

I noticed that there is a problem when setting providers after a generator has already been called. This gets around this problem by emptying the cached generators when new providers are set. 

Maybe we should create a 1.5.1 tag?

Thanks.