Don't crash when searching for invalid tag. Fixes #1097
Test searching for nonexistant tag
Clarify test
This is a better place for the test
Merge pull request #1111 from avanheuvelen/master

Don't crash when searching for invalid tag. Fixes #1097