Challenge to extended detention in NI succeeds