Improved segmentFunctionDeclaration to also segment var declarations that contain a function expression