minor #1389 Move method so it's only called when necessary (Tobion)
minor #1389 Move method so it's only called when necessary (Tobion)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Move method so it's only called when necessary

Small performance improvement for getAttribute

Commits
-------

a28e0f1 Move method so it's only called when necessary

moufmouf/Twig,fsw/Twig,znerol/Twig,nicolas-grekas/Twig,Tobion/Twig,hhamon/Twig,iKwinto/Twig,iKwinto/Twig,nicolas-grekas/Twig,gencer/Twig,moufmouf/Twig,phansys/Twig,dkarvounaris/Twig,nicolas-grekas/Twig,Tobion/Twig,loi-chuanoi/Twig,moltin/Twig,derickr/Twig,nicolas-grekas/Twig,gencer/Twig,hason/Twig,bocharsky-bw/Twig,jamessingizi/Twig,apishka/templater,Rvanlaak/Twig,framewr/Twig,bocharsky-bw/Twig,framewr/Twig,nicolas-grekas/Twig,craue/Twig,gamernetwork/Twig,fsw/Twig,phansys/Twig,hason/Twig,derickr/Twig,robregonm/Twig,fsw/Twig,moufmouf/Twig,hhamon/Twig,craue/Twig,robregonm/Twig,gamernetwork/Twig,moltin/Twig,iKwinto/Twig,znerol/Twig,dkarvounaris/Twig,bocharsky-bw/Twig,twigphp/Twig,jamessingizi/Twig,framewr/Twig,twigphp/Twig,apishka/templater,twigphp/Twig,Tobion/Twig,robregonm/Twig,gamernetwork/Twig,jamessingizi/Twig,huang53798584/Twig,hason/Twig,znerol/Twig,Rvanlaak/Twig,derickr/Twig,moltin/Twig,hhamon/Twig,Rvanlaak/Twig,huang53798584/Twig,huang53798584/Twig,dkarvounaris/Twig