Fix image layout tracking in pipeline barrier tests