Fix undefined offset when loading special page

This was caught by the tests I have added
in the follow up commit
Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a