If you have to pass a pointer to an element, don't pass @dynamic_array, because that is the location of the pointer to the dynamic_array.
At least @DistribName suffers from this. To correct it, make sure distribname has non-zero length (should be ok here) and then pass @distribname[0]