Fix issue where an instantiated foreign set would not be properly cached.

The logic now is that as long as a reference is held to the instantiated set,
a weak reference will resolve it such that a set is not created twice. This
has been made clear in the documentation which has also been improved somewhat
(both wording and formatting).