Re #8542. Protect against unknown pixel id's.

Specifically, when all the IDs in a bank are higher than the highest
known one from the instrument definition.
Re #8542. Co-locate related code.

Just moved up a piece of code - nothing functional has changed.
Merge remote-tracking branch 'origin/bugfix/8542_loadeventnexus_bad_alloc'