prepare for dcon-repeat to infer prest with drest,
also fix a bug in cs-gen-Function