Issue #1962578 by Berdir, damiankloip, dawehner, xjm: Fixed ViewsDataCache writes multiple times in __destruct().