protected function restoreHeaderPositions(\MUtil_Model_ModelAbstract $model, array $currentNames)
    {
        $lastParent = null;
        $results    = array();
        foreach ($currentNames as $name) {
            if ($model->is($name, 'type', \MUtil_Model::TYPE_NOVALUE)) {
                // Skip header types that contain no value
                continue;
            }

            if ($parent = $model->get($name, 'parent_question')) {
                // Check for change of parent
                if ($lastParent !== $parent) {
                    if (isset($results[$parent])) {
                        // Add another copy of the parent to the array
                        $results[] = $parent;
                    } else {
                        // Insert parent header on name if it was not shown before
                        $results[$parent] = $parent;
                    }
                    $lastParent = $parent;
                }
            } else {
                // Make sure a question (without parent) is picked up as parent too
                $lastParent = $name;
            }

            // If already set (as a $parent) this will not
            // redisplay the $parent as $result[$name] does
            // not change position
            $results[$name] = $name;
        }

        return $results;
    }