Yes, removing the portraits.2da fixed the problem. I just checked and the file is from the right game (KotOR1). The file is modified; there is one extra line (#41) for my custom character's portrait.
btw, without the portraits.2da file, there is a blank (transparent) square for the custom portrait. This is the same as with the file.