I simplified my example too much. Evidently the problem arises when one of the cursor fields is derived from a function. In my case I use a stored procedure in the DBC.
Select getfname(customer.fname) as f_name from customer into cursor ccustomer
where getfname() is defined in the databases stored procedures.