[Bug 18712] cmd: "if defined ... " command crashes.