Fix ArrayIndexOutOfBoundsException when merging state drawables