Fix ${extract expansion for use within ${if inlist etc.  Bug 1524

The coding of the numeric test on the key decided that empty was numeric, and
insisted on a third substring even in syntax-check "skip" mode.  This failed
when a single expansion variable was used for the key (eg. $item) and the
defaults for string2, string3 were being assumed.  Skip the test in skip mode.