Added tests for #1285 for something that's really a language bug (but only for the JVM implementation of it)