This is an extremly nasty bug as it may lead to wrong results without crash or error message.
I think the maxima plugin is not to blame because it provides the correct answer if it is used by SMath. I checked via log that at definition time of q.1 and Q.1 there is no Maxima activity, the integral is not evaluated although this would be possible.
Even with the expressions stored nearly verbatim, there should be no reason why the result for a call with undefined variable x should be different from a call with l.
I might completely misunderstand the logic of function definition here, though... But I realy liked the way it was working in former versions (did not nail it down to a particular update).