Use inspect.getargspec instead of __func__.co_varnames

The latter contains names of a function's other local vars in addition
to the names of its args, which could lead to confusion in obscure
cases. The main reason for doing this was to attempt make this bit of
code make a little more sense.

"co_varnames is a tuple containing the names of the local variables
(starting with the argument names)"
Add a failing test for decorating a class with a model perm
Only fetch instance from DB when it's actually used