Fixed invoke to consider dereference operators as targets for mem-ptrs
Improved test case for #1179