Also cache totalBoxes if we have HFW/WFH

Change-Id: Iea71c11b88df84b9c0949b1020a6bcc5395d62de
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>