I don't think there are any math errors here.  I think the issue is now down to the nonconvexity and to using starting values that match up very poorly with the btable.  To confirm, I should next use a random btable (where I can have thousands of observations with random q vectors) that has a somewhat match with my starting parameters.  I will allow myself to start tweaking w/ the approach once that works.  Might need stochastic or sequential gradient descent or a line search or something or Fisher scoring.  But I should be able to solve _any_ of these just by turning up the N.