improve error message and position for "bad decl override" error