Fix visualizer backend's behavior with list comprehensions and generators