Fixed an NPE when replacing ItemFrames if the frame cannot be correctly replaced.