lookup accordion group index in theme dynamically, rather than relying on stored index value; fixes #31