Thanks Mark and Rich for your reviews !!
Rereading the comments I found a different fix, that instead of fixing
'plugin_setup' (that is common to plugin init and
slapi_register_plugin), I made the fix only on slapi_register_plugin
where the precedence was forced to a default value. Please let me know
if you prefer the previous fix or the second.