The solution is to extract configuration files dependant code out of the init function and to initialize the fields member as depicted in the question below. How to add an array of fields as a ProtoField in Lua Dissector