Violation of finite-size scaling in three dimensions