cWindow: Fixed item dupe glitch with painting (#278)