Before this change, when making a remote call with "include" filter
(for example `findById(11, {include:['children']})`), the related
models were removed from the result.
This commit fixes the implementation to correctly preserve related
models and also to cast them to correct model instances.