Working around SWIG issues for GeneralDistMatrix