fix problem with captured/local variables in a generic context while debugging