Fixing RavenDB-1499 (2nd attempt)