Fix ArrayOutOfBoundException in recorder UI when removing duplicates, closes #1488