Okay I figured out the problem. It seems that I'm missing the function hp_get_nh_member_count which is used in the neighborhood.tcl in the normal mode. So the code works fine when running in tree mode.
Regards
Finn