Fix function redefinition - function name check

1. Include functionname in equality check
2. Added function rename testcases