make sure we free the method cache table
allow for building on clang and internal function declarations (tmm1)