The method for renaming a page - giving it a new index in a different object - involves trickery that briefly has the same page in two objects at once. To avoid this, define a pctrie_transfer method for moving an item from one pctrie to another without such trickery.
This depends on changes under review in D46895.