Handle `RangeError` from casting in `find_by` and `find_by!` on Relation

We should not behave differently just because a class has a default
scope.