Correct me if I'm wrong here, but this check is basically checking if `layer` is known to the server, yes?  If this is the case, maybe it'd be a bit clearer to add a method to `Layer` along the lines of `isKnownToServer`?