fix aborting at empty visibleItems
fix wrong predicates
Merge pull request #211 from emeitch/fix_set_collection_view_layout_bugs

Fix set collection view layout bugs