Fix ClassCastException in TilesConfigurer

Issue: SPR-10195