Replaced Name members by name() virtual functions (fixing a bug in matlab/dai.cpp)