Generated Java contains error for type-switching in debug mode
With a structure like this:

```yaml
meta:
  id: foo
  endian: be
  ks-debug: true
seq:
- id: code
  type: u1
- id: data
  type:
    switch-on: code
    cases:
      1: one
      2: two
types:
  one:
    seq:
      - id: first
        type: u4
  two:
    seq:
      - id: second
        type: u4
```

Kaitai generates code which looks like this:

```java
public class Foo extends KaitaiStruct {
    // ...
    public void _read() {
        _attrStart.put("code", this._io.pos());
        this.code = this._io.readU1();
        _attrEnd.put("code", this._io.pos());
        _attrStart.put("data", this._io.pos());
        switch (code()) {
        case 1: {
            this.data = new One(this._io, this, _root);
            this.data._read();
            break;
        }
        case 2: {
            this.data = new Two(this._io, this, _root);
            this.data._read();
            break;
        }
        }
        _attrEnd.put("data", this._io.pos());
    }
    // ...
    private int code;
    private KaitaiStruct data;
}
```

This gives the following compilation error:

```
[ERROR] Foo.java:[75,26] cannot find symbol
  symbol:   method _read()
  location: variable data of type io.kaitai.struct.KaitaiStruct
[ERROR] Foo.java:[80,26] cannot find symbol
  symbol:   method _read()
  location: variable data of type io.kaitai.struct.KaitaiStruct
```

since `_read` is not defined in `KaitaiStruct`. Since the variable is not always of type `KaitaiStruct` (I've seen some cases where it's `Object` instead, but haven't been able to come up with a simple example that exhibits that behavior), we cannot simply add `_read` as an abstract method.

If debug is disabled, the code is OK because the call to _read happens in the constructor instead of separately.

I've discovered a workaround, though: adding

```yaml
repeat: expr
repeat-expr: 1
```

to the type-switched field causes the compiler to create a more specifically typed temporary variable on which `_read` is called. Perhaps the correct solution here is to change the compiler to always use a temporary in debug mode.