Make sure there is an array in `Controller::generateMargin()` (see #5217)