Fix crash passing inline block that captures a scope variable as an argument of a method sent to a mock.
Simplify conditionals by checking for block type first
Release notes: Fix crash capturing inline blocks as method parameters.