You spotted it perfectly. On 5.3 it did give issues.
I changed $this->app to $app, and now it works on both 5.3 and 5.4 (tested with two Vagrant machines).

I also fixed a separate issue that came up: I failed to notice that this PR moved the service provider logic to the register() function, where it doesn't work. It needs to be in the boot() function, as it was before, where it has access to the entire ioc container (which isn't guaranteed in the register() function, as I understand it)

My bad for not testing the PR decently, thanks to both @franzliedke and @guilex for the education :-)