OptionValue doesn’t work if a local variable has the same name as the function itself

The following innocent-looking code results in error.

Options[add] = {number -> 1}; add[x_, OptionsPattern[]] := Module[{add},    x + OptionValue[number] ]; add[1] 

The error is

OptionValue::optnf: Option name number not found in defaults for add$  2832. 

What triggers the error is the fact that a local variable declared by Module has the same name as the function, add. (For simplicity, I’ve shown an example where this local variable isn’t actually used in the code, but this doesn’t make a difference.)

Is this a bug in Mathematica, or some known quirk of OptionValue[]?