By the way, did you declare the UPPER_FUNC() function to be deterministic? Could be that the function based index code is looking for that - it won't determine itself whether the function is deterministic, it needs the function itself to say so.