Fix empty stack trace in assertion for platform typed expression