looking at the ERG script and the code, it seems you need something like
(if (and (boundp '*lexdb-params*) *lexdb-params*)
(load-lexdb-from-script)
; else ...
i.e., the parameters and the function are different from what you
currently have