Merge "Fix issue #3289835: NullPointerException in..." into gingerbread