Limit backtrace frames to return
Merge pull request #6710 from JamShady/pull-request/micro-optimisation

[4.2] Limit Backtrace Frames To Return