Fix access to undefined variable in touch CDT handling