One more commit for MONDRIAN-1605. Looks like I jumped the gun on this one. This commit fixes all the remaining related issues.