Question: Bug in keyword parameters?

This might be a mis-understanding on my part, so I figured I would ask a question first.  Narrowing down my code to something minimalistic, suppose I have 2 functions, each of which take a 'context' (abbreviated ctx) as a keyword parameter.  Now, suppose that the first one calls the second, like so:

foo := proc({ctx :: list := []}) bar(ctx = ctx) end proc:
bar := proc({ctx :: list := []}) nops(ctx) end proc:

and then a call "foo(ctx = [a,b,c])" returns the (completely unexpected) value 0.  See if you can puzzle out why.  If I change my code to use different names, like

foo1 := proc({ctx :: list := []}) bar1(_ctx = ctx) end proc:
bar1 := proc({_ctx :: list := []}) nops(_ctx) end proc:

Then the call "foo1(ctx = [a,b,c])" returns the expected 3.

I have tried a number of variants, like changing the call to bar('ctx' = ctx) in foo, but that does not work.  The completely un-intuitive :-ctx does work.

Is this documented anywhere?  Is this really the intended design?  Not being to re-use a name for a keyword parameter without going through some contortions seems, a little, shall I say, odd?

Please Wait...