Correctly adjust the accordion elements to the new DB structure (see #5820)