ScriptedDashboard: bugfix for scripted dashboards and collapsed rows, Fixes #965