Merged trunk with inmem fixes to v1.60