If you don't need it to colide with anything before it is set to solid you could do this
Set it the solid in the layout editor
Start of layout set it's collision mode to none
When PV=2 set the collision mode to per pixel/box etc
Not sure about how you are doing it at the moment, have not tried to do anything with adding atributes.
also have a look at if this would work
Set the atribute to solid in the layout editor
Start of layout change the atribute
PV=2 set the atribute to solid
Just incase there was some issue with assigning atributes at run time. Who knows, right.
Now Newt will reply underneath this and have all the information and the perfect solution for you!