Make sure that arrays have unique names in C++ standalone, even if they have the same name and owner (this can happen for example for multiple connect calls with arrays). Fixes #302