Bug fix, irc submitted

If you have three scenes, current is A, others are B and C.

B uses C as background, and C uses B as a background.
(which is possible via linked libraries)

If you then try to use B or C as background of A, code went to eternal loop.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56689 954f8c5b-7b00-dc11-b283-0030488c597c