Fix interaction between Console(record=True)
and Capture
context manager
#2343
+22
−4
Console(record=True)
and Capture
context manager
#2343