I don't know all that much about how the lego games work internally, but isn't it possible that the NPCs in the game have data similar to the playable characters, and this is a result of making the game load that data as if it were a playable character's data?