now isolated the problem. It is triggered by a std::function bound to a lambda where some argument type is picked up from the template parameter of the enclosing function.