TMXLayer now has a method to safely repaint a single tile taking offsets into account.