Removed possible reference to element of empty vector in NcCompound::addMember
Removed some references to element in possibly empty vectors in ncVar.cpp