remove complex malloc-avoidance (bug #4601)