lambdas→functions. This fixes a segfault in static dtors