Fix warning "Invalid argument supplied for foreach()"

Gadget::loadStructuredList() can return false, when no gadgets are
defined, which results in the php warning.

Bug: 58700
Change-Id: Iab767c3a122931a3fac2fcd2af61a8408ed99b5a