The `PResourceType` branch here is to handle expressions of the form `Class[Foo]`. `Foo` is interpreted as a type and so shows up here as a `PResourceType` the name is actually already downcased and so a possible optimization would be to skip it in that case.

I'll change it to downcase only for the string case.