Don't enable doi lookup unless form dirty

Fixes #2858