Added test for #940
Fixed #940 visibility problem / callable invocation