Fix bug in get_api_field_for_mongoengine_field, needed for filtering on related fields which are not registered on the resource + test case.