Try to fix horrible Scala reflection issues through trickery