Improve error message for missing element.

Change-Id: I80beae77874e36d7f47880b030c225100b102e95
Merge "Improve error message for missing element."