Update functions.php

Previous flow did generate wrong output when more than one file uses deprecated functions.