In fact the original code makes the compiler crash as well when compiling from scratch. It looks like the fact that the code was accepted was an incrementality bug.