fixed one more crash

generate a dummy int tmp if we can't resolve a dependent name
try to get template decl from its specialization

if we can't find a cached template decl based on
the ParmDecl, try its specializations