Move pp->knowledge=NULL to after its last use.

This fixes a crash when !const=1.