unarr: fix RARVM edge cases (fixes issue 2665)