Copied from Clay's patch in LP Fixes bug #1277046 Change-Id: I2052ffaea3a74cdca9596b08273b7120570b1375