Completed selection of the right dispatch method that I had left TODO
the last time, i.e. all arguments are checked for compatibility, not
just the first
We can now handle static variables, also added test cases for public and
static variables