Add exclusion for unvisited template code
Finish template tests and fix nasty bug

There was a nasty bug because "inlines" as defined at the import level while
being a mutable. This lead to the list being always used and had very bad side
effects. Currently, I have no idea how I could write a test that detects such
behavior in the future, so we're gonna have to use some brain here.