don't try to reference through pvt if it is NULL (issue #5089)