Fix for #96 Handle optional parameters for constructor/method injection

Tests reproducing #96, and fix (to be implemented)