Honestly without completly inspecting the code I assumed that there was good reason for container being null in startContext and it appeared that the componentContext was only initially retrieved from the container at this point. So perhaps its really a check of the componentContext validity after the if in the startContext although putting it in doStartTag would effectively be the same assuming you checked after the startContext method call.
Well, in fact you're right, because attribute tags extend(ed) ContainerTagSupport, though they really don't need them (they interact only with parent tags), see
In the remaining tags (the Insert***Tag classes) the container is essential to work (at least they need to use the correct ComponentContext).
I committed some code (very different from the one you posted, sorry) that throws a JspException in ContainerTagSupport.doStartTag when a container is not found.
Thanks a lot anyway, your effort was not thrown away! And go on inspecting code, every help is welcome
Let me know if it fits your needs, so I will resolve this issue.