Fix: Ensure getJSDocComment() works for all function declarations (fixes #638)