There is no bug - I confused GL_PACK_ALIGNMENT and GL_UNPACK_ALIGNMENT. Sorry if I wasted anyone’s time.