Fix bug in handling dated references.