LazyEntityReference fixes: use the given version if passed in, and JSON serialization