Fix notices when generating expected tokens list