It seems the type checking done inside `mapping()` in Flow fails when using the returned value from a static function or similar.