#1032 Move private functions inside the closable scope.