Fix checking size of function to build in _build_decoder.