Moved extension filter to correct place

Changed: the location of banned extensions loop made it so that only
relative URIs were checked for extension.