It seems that there is a totally strange bugs with attacking pets that didn't disappear. I accidently hit my "/cast Energy Arrow" shortcut while having a pet, that didn't disappear after the usual timespan, selected. And I really attacked that pet. Out of curiousity, I fired another arrow. Again, I attacked it. Then I wanted to fire another one, but that was impossible. I checked my system tab. It read "You can not attack Tefusang. You can only cast it on living monsters". Then I tried again after a few minutes. This time, my system tab read "Rat is too far away to cast Energy Arrow".
While writing this post, I tried again. This time it read "You can not attack Daperr Daner". The pet showed the characters current HP!
*hopes /dig gold will work near a pet as well*