jpeg2000: Check that nreslevels2decode has been initialized before use