Issue #3423329 by catch, kristiaanvandeneynde, dww, alexpott: Prevent session garbage collection during functional tests