Apply limit in outer clause of getMultiple, but avoid full table scan

@coderunner @mlaflamm @appaquet