Throwing a RecordNotFound exception when a record is scanned using the
inverse_of option. I've also refactored the code for raising a
RecordNotFound exception when searching for records with ids.
Merge pull request #10022 from wangjohn/find_on_nonexistent_id_raises_error

Throwing a RecordNotFound exception when a record is scanned using the inverse_of option