*if the owner does not see the attacker can not attack the pet
Shouldn't this be: if the player or the pet can see the target -> pet can attack?
The target does not need to be in LOS of the owner for the pet to attack.
All of these are valid:
See this discussion as to why pet LOS is not properly implemented... yet...