Well, a correction: it compiles but it does not work at all. So the correct problem report is probably: extern is silently ignored for texture variables.
IMO this might cause someone a real pain, because this behaviour certainly is neither obvious nor expected.
I agree that it not completely obvious. But, the programming guide does say that texture references are implicitly assumed to be static variables at the file scope. Your extern texture will be a different texture reference in each compilation unit because of this.