Fixes regression for Piwik UI tracking in debug mode.

fixes #3814