Don't return underlying query builder

Fixed #3732 and other issues with models being returned as StdClass.