Added circumvention for bug introduced at least in r55223 (obj.ray_cast does not see geometry of other objects in Local View mode).
Fixed & optimized cursor-stick-to-object feature.
Changed print(e) to print(repr(e)), since console window can't handle unicode.