Fixing bulk dereferencing for posts that use the same image. This was not setting the dereference variable as expected on all but the last post that used said image.