Fix for recursive get_context causing maximum recursion depth exceeded
errors