Apparently ASM's Type#getElementType returns the type of the array even if it's multi-dimensional, so the loop was incorrect