fix name generation to differentiate functions from locals