interface: rework code to get rid of interface_set_dynamic