There are a few things to try, settings to adjust.
I don't have a PC3 but these are MIDI basics.
1. The PC3 may (or may not) have a setting that echoes MIDI IN to MIDI OUT, if so, disable that setting.
2. The setting you're looking for in Logic is under Settings/MIDI "Instrument Without MIDI Thru Function".
Not very clear is it? Use the Drop Down to make a selection, your Kurzweil Instrument should show up there.
Of course you aren't using both standard 5-pin MIDI cable and USB at the same time.
While you're at it, read up on the Kurzweil's "Local Control". When off, local control separates the PC3's keyboard from it's internal synthesizer engine. Local OFF: With no midi cables plugged in the keyboard will not make a sound because the internal keyboard/synth connection has been disabled, however, the Keyboard will still transmit MIDI data and the internal synth will still respond to incoming MIDI data. With Local OFF enabled, you can only play the PC3 by echoing MIDI through a computer. What this does is prevent a doubling of notes, with Local on and MIDI thru enabled, the Kurzweil is played both by it's internal kybrd connection and MIDI, essentially cutting the polyphony in half and giving a phased output sound. This is fundementally unrelated the the MIDI Loop problem.