Fixed bugs caused by scrolling

Sometimes when you represent your table as a long single row and try dragging cells when the whole table being scrolled, cells are moved far away from table. This was caused by wrong scroll offset values calculation logic. It was calculated using the "the first match" rule. While it should be calculated using the "sum of all available" rule.