Fix #445: Debug console crash when evaluating some types of expressions in a generic context