Make reference deletion less conservative.

Fixes #266.