Add an earlier check and error for names that won't work for services.

Fixes #1013