be a bit more permissive about allowed method name expressions.
fixes #2984