Improve error messages for invalid `extends`

Summary

Error messages for extends are not clear enough.

Solution

The current error message is: unknown key in extends.

Replace unknown key in extends with invalid extends in line #LINE_NUMBER, undefined parent where #LINE_NUMBER is the number of the line where the error surfaced first.

Edited by Dimitrie Hoekstra