Merged in changes to episodic memory from 9.4 branch