Testcase, fix for wrong inlining of variables.

Also add a new parameter for the inlining, so that it can be overridden.