Fix #1144, usually using a helper method to avoid NPEs. Not sure if the typesafety of the helper methods is really worthwhile, but let's try it for now.
Issue #1761: Add tests, @Ignored for now.