Fix accidental deletion of extended properties.
Created by: th-h
Was mostly fixed by 8b51c37b (see #261 (closed)), but which missed 03cc73d7 and the other older code before the foreach() loop. Later on, 7fe8d91b did the check for 'propertyform' the wrong way around.
See #688 (closed).