Fail if requested variable is not available

Changed from _accept_ to _fail_ if requested variable is not available.

This is the patch originally referred to as 3/3 in #4581.