Improved exception message while trying to access an attribute from an empty array

Rebased #1439 in master and updated twig extension
Hum... It looks like I got a problem during the rebase