Limit AMX backtrace depth

Sometimes there may be cycles in the stack frame chain, or a frame
may point to itself (not because of recursion).