make sure right overload of PtrToStructure is called

Universally apply pawel's patch for cpymarsheltest.py

Signed-off-by: Tim Orling <TicoTimo@gmail.com>