I've finally been able to track down this bug. It's due to a misapplied
unsafe operation in the Typed Racket optimizer, and that bug is
triggered when compiling "midi-readwrite" --- which is why it's so
consistent for you and not seen by others who don't have the package
installed.
In the TR implementation, changing `unsafe-Req-seq` to use `Rep-seq`
instead of `unsafe-struct*-ref` produces the error
Rep-seq: contract violation
expected: Rep?
given: #f
compilation context...:
..../pkgs/midi-readwrite/midi-readwrite/midi-read.rkt
context...:
..../typed-racket/types/subtype.rkt:238:0: subtype*
....