I can't submit this as a bug report because it's to do with the SDK and the closure compiler minfier. So, to all you javascript devs, just be aware that if you use the array.includes(x) method then it will become corrupted by the minifier (r246). Of course, you can work around using array["includes"](x).
Just for info in case anyone else gets caught out by this (that's an hour of my life I shalln't get back)!