Definitely leave if you think you were definitely passed over due to some shit like that. I was thankfully wrong about my recent scare regarding somewhat of the same situation, but I found out after I had put my application out there.
If the job you are at will not provide you the positions to befit your qualifications and experience, it's definitely time to seek employment elsewhere.