#205604 fix; checks to ensure that $pv->context is not called when it is empty; doing so generates ugly foreach errors