Was mostly fixed by 8b51c37b98 (see #261),
but which missed 03cc73d77e and the other
older code before the foreach() loop.
Later on, 7fe8d91bc2 did the check for
'propertyform' the wrong way around.
Cherry-picked from master branch.
1.41.4 has *not* been backported.
Signed-off-by: Thomas Hochstein <thh@inter.net>