Upgrade to the latest version of doctrine.

Fixes #689