Avoid infinite recursions.

Some frameworks (most notably Plone) tend to have modules that require each other. This leads to infinite recursions. This patch is one way to avoid them.