Make the parsing of setkey -d(SAs) more reliable. Fixes #4043