Please see the image attached to see what is going on.
I made a layer from the NYC LION database (blue lines) via an SQL query (orange lines), I call this layer "LION_CD". I then went to make another feature layer using a different SQL query based on the output of the previous call to Make Feature Layer (yellow lines), called LION_CD_ST. As you can see in the image, lines not in LION_CD were selected even though LION_CD was the input file. How is this happening?