Is there no space in the engine compartment at all, or just behind the engine? The fuel plumbing doesn't all have to fit behind the engine. In general, the shorter the fuel run the better, but if you need to put the filter somewhere else, go ahead. If you're worried about metal to metal contact, fasten the filter somewhere, perhaps to the firewall. Oh, by the way, I don't run filters on any of my planes.