Merge pull request #238 from SamSaffron/fix

fix inheritance issues
this little bit of caching gives us a massive perf gain on Discourse, 20% for tiny pages