Nope, index.php had nothing to do with it. Over several iterations I uninstalled, purged and reinstalled both from Debian repos and manually — the only thing left was the roundcube db, which I was reluctant to drop. Well, dropping it and recreating again with dpkg-reconfigure roundcube-core did the trick.
There was another issue afterwards 'cause I updated php to version 5.6, which introduced mandatory peer verification with ssl:// streams, and that roundcube apparently can't handle. Fixed by php rollback to 5.4.4.