Fix a bug which caused the handler not to expose models from a has-many relationship