allow extensions to get the correct stack trace

better implementation ideas here would be nice