Detect spurious trailing tokens in flat specifications, fixes #352