1. Typo in CDrule::exists()
if (isset($object['hostids'])) $options['druleids'] = zbx_toArray($object['druleids']);
must be
if (isset($object['druleids'])) $options['druleids'] = zbx_toArray($object['druleids']);
2. In CDRule.get() the limitSelect options must sort dcheck by "dcheckid" and "dhosts" by "dhostid", not by "name".