CTRL-P in definitions raises exception

fixed. Thanks for the report @tgd!