Thanks for the suggestion Paul.
Just tried that but still no go.
It appears that the loop is looping, just that the portD input data is not being read into wherever it is supposed to go, unless I reset the chip.

Bloody frustrating, ain't it???