Ensure key is passed to encoder in various spots.