Fix the problem that it was treating member functions as non-member functions
when trying to get the parameter size. This causes some non-parameter variables
showing up in function signature. Suprisingly,
cantFail(TypeDeserializer::deserializeAs<ProcedureRecord>(...)) just sliently
parse it without error and gave the wrong result.
It's hard to test it. This only causes problem when params_remaining
is larger than the real parameter size. If it's smaller, we also check
individual local variable's attribute to see it's a parameter. When I trying to
come up with a test, the parameter size is always 0 if we parse LF_MFUNCTION as
LF_PROCEDURE.
Because we also check individual variable's debug info kind (parameter or not), if the deserialized parameter count number is smaller than actual number, this would fix it. So, it only causes problem when the deserialized result is larger which causes non-parameter local variables count as parameters.
The reason for this check, I vaguely remember, is that some function debug info has missing parameter count (e.g. 0), but the individual variable debug info says it's a parameter.