Fix for the issue that makes wrong layout calculations when section items = 0

This fix works when any section has items count = 0. I make the presumption that datasource should handle if section header and footer for a section with items count = 0 should be shown. But this could be modified in order not to show header/footer for sections without items.