[BZ-1029911] add test demonstrating that the type safe check works with inner classes