D.get_id returns -1 for inactive domains instead of throwing an error.