Fix GCC warning "'elements_' may be used uninitialized in this function" if enabling optimizations

Patch by Andreas Lauser, thanks.

Fixes FS 1239