Fix #719 by calculating the decoder trace height dynamically