Only trigger profiles if profile and query both exist, otherwise fall back to original query flow.