As mamya says it's more the underlying condition I think, if you may have a sensitive stomach, previous ulcer etc... (which you may be taking omeprazole for) which could be irritated by some painkillers.

I was warned off ibuprofen and diclofenac but it's more a balancing measure. I've taken them in limited doses as they were most appropriate for pain I was having at the time and when I spoke to my GP it seemed a benefit I was on omeprazole to provide a bit of a buffer for my stomach.