Ford,
I tried your code (also on 1.38 Beta) and don't seem to be seeing the same problem as you.
In any case, it's pretty easy to guess what might be going on. Generally, compilers try to be smart and help you avoid things that are unintended. In this case, it appears that the compiler is not figuring out that the code will always return something, because all of the return statements are inside of conditional branches.
An easy way to fix this would be to remove the 'else' clause and just leave the last return statement outside of the 'if' altogether. That way, the compiler will have an easy time seeing that, no matter what, a value will always be returned:
By the way, are you sure that this is the only function in the code that could be causing the problem? As I mentioned earlier, your unmodified code appears to compile just fine for me (no errors).