I had this problem too when I first played. What sucks was the only thing I could do to fix it was to go to a previous save
Apparently, if you go to where the slicer is first and get the codes, then talk to the Captain, you must
tell him you already have the codes... otherwise you get stuck in the endless cycle.
This game is horrendous about tying up loose ends, and it's a shame when some of these "loose ends" can be game-crashing, game-ending or with hot tempers... "game-trashing". They really
need to get off their arse, because if NWN-2 is this buggy...there will be hell to pay
Off-hand, there's probaby a gobal you can check with tk's KSE tool, but off-hand I'm not sure which one(s) it would be.. sorry