imagedetailspage: Fix crash with more than 15 layers

If you had more than 15 layers the system would crash since one more
value is added to one array than the other. This fixes the code
so equal numbers of values are added to the arrays and hence
doesn't crash when many layers are enabled.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>