Fix NotFound exception catching

Fixes bug #1147011

Change-Id: Iafd7d383482d033870552354051053a7cab6f847
Merge "Fix NotFound exception catching"