Fixed handling of undefined targets in evaluateKeyPath