[BUG #8760] In this case target was undefined. But the check only checks for null