Fix self-install dev heuristic to refuse to operate on a checkout.

Fixes #1106.