It seems the problem occurs only if a user logs in via “physical display”. Therefore, it can be a workaround to disable login via physical display. Edit the /usr/NX/etc/server.cfg file and add the following line: “PhysicalDesktopSharing 0”.
It is a workaround, though it is not the real solution for the cause.