Custom PHP code as a Panels selection rule
I think the calling function which executes your PHP code would expect the RETURN true/false statement. Thus, you would need return to the calling function as returned by the called function.

return mymodule_selection_rule_is_location_set();


If you don't have return, the calling function would expect NULL and it would execute as FALSE always regardless of what is returned by the called function.