Added failure check for infinite export recursion.

Added test case for disallowed circular exports.