Fixed issue #3085. Provided MT test case with functions and pool