Prevent Facets from colliding with each other

I started seeing this strange test error in Jenkins in getView("slave-agent.jnlp.jelly") where Stapler tries to load it as a Groovy script and fails.
The stack trace is below:

	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
	at org.kohsuke.stapler.jelly.groovy.GroovyClassLoaderTearOff.parse(GroovyClassLoaderTearOff.java:92)
	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:50)
	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:39)
	at org.kohsuke.stapler.AbstractTearOff.resolveScript(AbstractTearOff.java:76)
	at org.kohsuke.stapler.AbstractTearOff.loadScript(AbstractTearOff.java:82)
	at org.kohsuke.stapler.CachingScriptLoader.findScript(CachingScriptLoader.java:59)
	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.createDispatcher(GroovyClassTearOff.java:57)
	at org.kohsuke.stapler.jelly.groovy.GroovyFacet.createRequestDispatcher(GroovyFacet.java:108)
	at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:178)
	at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:165)
	at hudson.slaves.SlaveComputer.doSlaveAgentJnlp(SlaveComputer.java:558)

This made me realize that currently there's no coordination done in the getView() method to decide which facet the view is supposed to be loaded. If the parameter is without the view file type extension, each facet attempts to add its own extension and one will find it correctly, but if the full file name with the extension is given, everyone will try to load that as their own language and it'll fail like this.

I guess the only reason it worked for me thus far was because the initialization order caused JellyFacet to be put there first, which will then handle other Jelly-compatible view types well. IOW, it was working only as a coincidence.

As I think more carefully about this, I think this is clearly untenable. Since it's not realistic to expect Facets from telling the difference between trying to load a script written in another language vs loading a script that contains a programming error, I think the only option is to require that Facets use a fixed set of file extensions.