Put in workarounds for a scala compiler issue