Also I tried resetting Master Categories ID like that troubleshooting article suggested, but it made no difference.