ComponentA is indeed declared in both sections.
I also removed the .tmp folder to be sure there was no remaining data and rebuild.
What I can’t understand is why one page knows ComponentA and another doesn’t recognise it.
Another observation:
I’ve copied the template from ComponentA to ComponentB.
Then I linked PageA to ComponentA and PageB to ComponentB then the error does not occur.