Warn about invalid location sooner

Fixes #613