#2478: merged r13164,r13165,r13237,r13261 from trunk to stable (resolving conflicts). This should solve the build fail.