Prevent #ancestors from returning all nodes when there are no parent_ids