adding patch for GAE issue 236
using code reviewed version
Merge pull request #1570 from AppScale/ndb-fix

Applying NDB patch for issue 236