Greg found some issues (possible NPE's, and similar issues) in PR #644 that are now fixed for 1.6.3, but the patches also useful for 2.x branches.