scan: improve the inline function parsing further