IS kernel: improving rebuild_array()