[core] better set_p_p? assertions #1024