Merge "Make sure the drawing cache is invalidated when reattaching a view. Bug #2373677"