Drush ignoring `$options['config']` statement in drushrc file from the 'drush' folder at the root of the current git repository
As Clive said, the snipped goes in $HOME/.drush/drushrc.php, not in the drushrc.php file in your site folder.  The drushrc.php in your site folder does not get parsed until Drush bootstraps your site; by that time, it's too late to add items to the 'config' list, as it has already been processed.

Also, in place of:

$repo_dir = drush_get_option('root') ? drush_get_option('root') : getcwd();

... it would probably be better if the snippet used:

$repo_dir = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT') ? drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT') : getcwd();

Finally, rather than setting the 'config' option, which is gitchy and a little high-strung, you could just include your drushrc.php directly.

Replace:

$options['config'] = $repo . '/drush/drushrc.php';

with:

include $repo . '/drush/drushrc.php';

Then you could go back to putting this snippet in your sites/all/drush/drushrc.php, if that's working better for you.