Fix compilation

Non-local returns for some functions were prohibited in Kotlin as per
https://github.com/JetBrains/kotlin/commit/70adb0f4e2e4ac25ea2c635a7770163c45934d03

Also fix an inline-related warning