Problem was that your code looks for 'preselectable' and 'selectable' and a lot of the custom figuredata is usually missing 'preselectable'. All I did to fix my figuredata was add the 'preselectable' to the figures that were missing it.
Also, a couple of custom figuredata have duplicate id's...