detects circular refs in list, dict, class and raises ValueError instead of letting it crash with a recursion error. Version 1.7.