Only build up a definition ancestry if we have any data

Why we wouldn't have this, I don't know, but an error gets thrown by the parser sometimes.