Entity.getComponent would sometimes throw an ArrayIndexOutOfBoundsException.