Manual merge of master, including regression fixes from the android build merge