3.1.1 update broke dashboard with "Error: [$injector:modulerr]..."

Tried to update my Piwik to 3.1.1 using the same manual method that I usually use - downloaded the latest Piwik and FTPed it into my remote Piwik directory, overwriting all. Now when I try to view my dashboard - or seemingly any page on my Piwik frontend - the page is incomplete and I get the following error in my browser console:

Error: [$injector:modulerr] http://errors.angularjs.org/1.6.5/$injector/modulerr?p0=ng&p1=this%20is%20null%0AHe%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A272%3A262%0AFunction.prototype.bind%2F%3C%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A3651%3A22179%0Ainstantiate%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A163%3A458%0Ac%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A160%3A368%0AUb%2F%3C%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A127%3A410%0Ap%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A127%3A195%0Ad%2F%3C%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A160%3A289%0AFe%2F%3C%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A148%3A421%0Ainvoke%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A163%3A355%0Ad%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A161%3A229%0Ag%2F%3C%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A161%3A376%0Ap%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A127%3A5%0Ag%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A161%3A138%0Agb%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A165%3A251%0Ac%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A141%3A19%0AUc%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A141%3A332%0Axe%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A140%3A1%0A%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A452%3A241%0Ai%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A4%3A27146%0AfireWith%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A4%3A27914%0Aready%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A4%3A29705%0AJ%40https%3A%2F%2F[mydomain].org%2Fpiwikstats%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D6dffe43c362487a6bedc306158971bed%3A4%3A29890%0A
K/< https://[mydomain].org/piwikstats/index.php:126:76
g/< https://[mydomain].org/piwikstats/index.php:162:70
p https://[mydomain].org/piwikstats/index.php:127:5
g https://[mydomain].org/piwikstats/index.php:161:138
gb https://[mydomain].org/piwikstats/index.php:165:251
c https://[mydomain].org/piwikstats/index.php:141:19
Uc https://[mydomain].org/piwikstats/index.php:141:332
xe https://[mydomain].org/piwikstats/index.php:140:1
<anonymous> https://[mydomain].org/piwikstats/index.php:452:241
i https://[mydomain].org/piwikstats/index.php:4:27146
fireWith https://[mydomain].org/piwikstats/index.php:4:27914
ready https://[mydomain].org/piwikstats/index.php:4:29705
J https://[mydomain].org/piwikstats/index.php:4:29890

Any Ideas? Thanks! (note that I’ve replaced my actual domain with [mydomain] in the quoted error).

Ok I was able to work around the issue though I still don’t know exactly what went wrong. I temporarily deleted my config.ini.php file, then visited a Piwik frontend page in a browser. I got the “The Piwik configuration file couldn’t be found and you are trying to access a Piwik page. You can install Piwik now” page. Then I restored my old config.ini.php and refreshed the same page and everything resumed working as normal. So this procedure must have reset something.