Fixed MethodScanner that on latest prm value fails

Unit test for this case added anyway