Java2D images crash after being resized (#2113)