Thanks rojart,

d3d_entsort = 0 does the job. I looked everywhere, except for these 3d3 functions. Seems it is time to reread them.
The palms do not sort properly now in some cases as predicted, but that is a minor (not so visible) problem.

henning