Backout fixes for bugs 261037 and 931464 (changesets 44de05b3239b, 3ba941e15e5e, eeec8acdb32c) to fix Drupal issues in bug 960277. a=bajaj