post permalinks with dot in url don’t resolve to correct page template

I wound up using the index_template filter to load the right template when the CPT single page is being incorrectly redirected to the index and $_SERVER['REQUEST_URI'] contains the slug of the CPT. Like so:

add_filter('index_template', 'wpse300393_resolve_cpts_with_dots_in_name');

function wpse300393_resolve_cpts_with_dots_in_name($templates=""){
    if( strpos($_SERVER['REQUEST_URI'], 'artwork') !== false ){
        $templates = locate_template( 'single-artwork.php' );
    }
    elseif( strpos($_SERVER['REQUEST_URI'], 'artist') !== false ){
        $templates = locate_template( 'single-artist.php' );
    }
    return $templates;
}